import { defineStore } from 'pinia'

export const useIfcStore = defineStore('ifc', {
  state: () => ({
    isLoading: false,
    error: null,
    selectedElement: null,
    isMeasurementActive: false
  }),
  
  actions: {
    setLoading(loading) {
      this.isLoading = loading
    },
    
    setError(error) {
      this.error = error
    },
    
    setSelectedElement(element) {
      this.selectedElement = element
    },
    
    setMeasurementActive(active) {
      this.isMeasurementActive = active
    }
  }
})

